package main

import "fmt"

func main() {
	var arr = []string{"aaple", "app", "app"}

	num := 0
	bl := true
	for bl {
		var c byte
		for _, v := range arr {
			if len(v) <= num {
				bl = false
				break
			}
			if c == 0 {
				c = v[num]
				continue
			}
			if c != v[num] {
				bl = false
				break
			}
		}
		if bl {
			num++
		}
	}

	fmt.Println(num)
}
